#ifndef POINTPROTOCOL_H
#define POINTPROTOCOL_H

#include <QObject>
#include "Protocol/BaseProtocol.h"
#include "DataType/DataType.h"

class PointProtocol : public BaseProtocol
{
    Q_OBJECT
public:
    explicit PointProtocol(QObject *parent = 0);
    QList<Package> parseData(QByteArray data);
    QByteArray generateData(Package package);
    QByteArray getPointData(quint16 function,quint16 addr,quint16 value);
    enum FunctionCode
    {
        ControlPoint = 0X0F80,
        SetUdpSwitch = 0x0F81,
        SetZigbeeParam = 0x0D100117,
        GetZigbeeParam = 0x0D100119,
        ReStartZigbee  = 0x0D100118,
        StartNewZigbeeNet= 0x0D10011a,
        AllowNewJoin   = 0x0D10011B,
        BanNewJoin     = 0x0D10011C,
        QueryNewZigbeeParam= 0x0D10011D,
        QueryZigbeeVersion=0x0D10011E
    };

private:
    enum CheckSteps
    {
        CHECK_HEAD,
        CHECK_LENGTH,
        CHECK_LENGHTSUM,
        CHECK_BODY,
        CHECK_CHECKCODE,
        CHECK_END,
    };

signals:

};

#endif // FIRSTPROTOCOL_H
